<div class="wrap">

<!--COLUMN 1-->
<div class="FourColGrid_c1">
		<?php 
            if($a_DetailVacancy['Vacancy']['Avatar'])
            {
                echo '<img src="'. Router::url('/').'app/webroot/img/avatar/'.$a_DetailVacancy['Vacancy']['Avatar'].'" width="100" height="100" alt="Locum">';
            }else
            {
                echo '<img src="'.Router::url('/').'app/webroot/img/avatar.jpg" width="100" height="100" alt="Locum">';
            }
          ?>
</div>
<!--COLUMN 1-->

<!--COLUMN 2-->
<div class="FourColGrid_c2">
<h1 class="TitleTwo"><?php echo $a_DetailVacancy['Vacancy']['Title'].' Id'.$a_DetailVacancy['Vacancy']['id']?></h1>
<p>
<b>Area - </b><?php echo $GLOBALS['Country'][$a_DetailVacancy['Vacancy']['County_id']]?><br>
<b>Rate of pay - </b><?php echo '£'.$a_DetailVacancy['Vacancy']['HourlyRate']?> per hour<br>
<b>Milage allowance after - </b><?php echo  $a_DetailVacancy['Vacancy']['MilageAllowanceAfterMiles'] ?> miles<br>
<b>Milage rate - </b><?php echo $a_DetailVacancy['Vacancy']['MilageRateInPence']?> pence per mile<br>
<b>Other expenses - </b><?php echo $a_DetailVacancy['Vacancy']['OtherExpenses']?>
</p>
<p>&nbsp; </p>
<p>For more information on this vacancy<br>
please click <?php echo $html->link(__('view store', true), array('controller'=>'pharmacies','action' => 'view_store/'.$a_DetailVacancy['Vacancy']['Store_id']), array('target' => '_blank'));?></p>
<br>
<br> <a class="TitleFive" style="width: 50px; float: left;" href="javascript:void(0);" id="vac_delete">Delete</a>
<div style="clear: both;"></div>
</div>
<!--COLUMN 2-->

<!--COLUMN 3-->
<div class="FourColGrid_c3">
<div id="eventCalendarNoCache"></div>
<p>
  <script>
$(document).ready(function() {
	$("#eventCalendarNoCache").eventCalendar({
		eventsjson: '<?php echo Router::url('/').'vacancies/getJson2/'.$a_DetailVacancy['Vacancy']['id'] ?>',
		cacheJson: false,
		multiple: true,
		allowClick:false,
		jumpMonth:'<?php echo $jump;?>'
	});
	$("#vac_delete").click(function(){
		var id = <?php echo $a_DetailVacancy['Vacancy']['id']?>;
		var user_id = <?php echo $session->read('User.User.id')?>;
		var router = '<?php echo Router::url('/');?>';
		jConfirm("Do you want to delete this vacancy", 'Confirm', function( b_OK ){
			// Delete
			if ( b_OK == true ) {
				$.ajax({
	                type: 'POST',
	                url: router + 'vacancies/delete/' + id,
	                dataType: 'json',
	                success: function(data){ 
	                    if(data.success == 'true')
	                    {
	                        jAlert('Delete this vacancy successfully', 'Message', function(){
	                        	window.location = router + 'pharmacies/view/' + user_id;
							});
	                    }
	                    else
	                    {
	                    	jAlert('Can not delete this vacancy', 'Message');
	                    }
	                },
	                error: function(message){
	                    jAlert('Network connection errors', 'Message');
	                }
				});
			}
		});
	});
});
</script>
<p>Calendar key</p>

<ul class="listTwo">
<li class="unavailable"> = Vacancy</li>
</ul>
</div>
<!--COLUMN 3-->

</div>

<div class="wrap">
<!--COLUMN 4-->
<div class="FourColGrid_c4" >
<h6 class="TitleFive">Locum Search</h6>
<?php echo $this->element('search_for_pharmacy');?>

<?php if ($session->read('User.User.UserType') == 2):?>
<br>
<?php echo $this->element('invite_pharmacy');?>
<?php endif;?>

<?php if ($session->read('User.User.UserType') == 3):?>
<br>
<?php echo $this->element('invite_store');?>
<?php endif;?>

</div>
<!--COLUMN 4-->

<br class="clear"/>
</div>
